import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * clase Cubo  
 * 
 * @author Anthony Misael Robledo Perez
 * @version 1.1
 */
public class Cubo extends Maloso
{
    /**
     * mueve el objeto
     */
    public void act() 
    {
        if(!super.esObstaculo()||!super.esObstaculo2())
        {
            this.setLocation(this.getX(),this.getY()+1);
        }
        if(super.esObstaculo())
          this.setLocation(this.getX(),this.getY()-1);
        if(super.esObstaculo2())
          this.setLocation(this.getX(),this.getY()-1);
        // Add your action code here.
    }   
     
}
